package com.daiqile.mysupertab.adapter;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.daiqile.mysupertab.R;
import com.daiqile.mysupertab.model.FunctionList;

import java.util.Collection;
import java.util.List;

/**
 * @author Mr.Bean
 * @date Created on 2017/10/14.
 */

public class FunctionsAdapter extends BaseQuickAdapter<FunctionList,BaseViewHolder>{
    public FunctionsAdapter(@Nullable List<FunctionList> data) {
        super(R.layout.functions_items,data);
    }

    @Override
    public void addData(@NonNull Collection<? extends FunctionList> newData) {
        super.addData(newData);
    }

    @Override
    protected void convert(BaseViewHolder helper, FunctionList item) {
        helper.setImageResource(R.id.fc_image,item.getImageId());
        helper.setText(R.id.fc_name,item.getName());

    }
}
